package com.example.springboot1.dao;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

import java.util.Date;

/**
 * <p>
 * 施工作业单
 * </p>
 *
 * @author zhengxianbin
 * @since 2020-05-13
 */

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_form_contruction")
@ApiModel(value="FormContruction对象", description="施工作业单")
public class FormContruction extends Model<FormContruction> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "新智推送ID")
    private String pushId;

    @ApiModelProperty(value = "项目ID")
    private String projectId;

    @ApiModelProperty(value = "申请人ID")
    private String ownerId;

    @ApiModelProperty(value = "施工单位ID")
    private String constructionUnitId;

    @ApiModelProperty(value = "施工部门")
    private String constructionDeptId;

    @ApiModelProperty(value = "任务单名称")
    private String formName;

    @ApiModelProperty(value = "任务单号")
    private String formNo;

    @ApiModelProperty(value = "审批实例ID")
    private String approvalId;

    @ApiModelProperty(value = "状态[0-已创建，1-审批中，2-审批通过，3-审批驳回，4-审批撤销]")
    private Integer approvalStatus;

    @ApiModelProperty(value = "状态[0-编辑中，1-任务单审签中，2-任务单审签驳回，3-任务单审签撤销，4-待维修，" +
            "5-维修中，6-维修完成，7-待验收，8-验收登记中，9-验收登记不合格，10-验收登记完成，" +
            "11-验收审批中，12-验收审批驳回，13-验收审批撤销，14-已完成，15-待计量，16-已计量]")
    private Integer formStatus;

    @ApiModelProperty(value = "发布时间")
    private Date publishTime;

    @ApiModelProperty(value = "审批完成时间")
    private Date approvalTime;

    @ApiModelProperty(value = "维修时间-开始时间")
    private Date maintainStart;

    @ApiModelProperty(value = "维修时间-结束时间")
    private Date maintainEnd;

    @ApiModelProperty(value = "损坏原因")
    private String damageReason;

    @ApiModelProperty(value = "任务描述")
    private String description;

//    @ApiModelProperty(value = "桩号")
//    private String stakeNo;
//
    @ApiModelProperty(value = "是否关联病害 0-未关联 1-关联")
    private Integer isRefDisease;

    @ApiModelProperty(value = "位置")
    private String pos;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    @ApiModelProperty(value = "类型[1-日常养护，2-养护工程，3-应急养护，4-推送清扫类，5-推送养护类，6-现场处置]")
    private Integer type;

    @ApiModelProperty(value = "最终生成文件")
    private String docPdf;

    @ApiModelProperty(value = "0-不跳过审批, 1-跳过审批")
    private Integer isSkip;

    @ApiModelProperty(value = "逻辑删除[0否，1是]")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "任务下达时间")
    private Date formTaskTime;

    @ApiModelProperty(value = "创建时间")
    private Date gmtCreate;

    @ApiModelProperty(value = "更新时间")
    private Date gmtUpdate;

    @ApiModelProperty(value = "关联单位")
    private String createUnitBy;

    @ApiModelProperty(value = "设施类别")
    private String structureType;

    @ApiModelProperty(value = "计量")
    private String measurementId;

    @ApiModelProperty(value = "关联单位")
    private String refOrgCode;

    @ApiModelProperty(value = "耗时统计：开始计时时间")
    private Date startConsumeTime;

    @ApiModelProperty(value = "耗时量(小时）")
    private Integer consumeNum;

    @ApiModelProperty(value = "是否紧急下发[0-否，1-是]")
    private Integer isUrgent;

    @ApiModelProperty(value = "是否补全[0-否，1-是]，注意该字段为保留字段")
    private Integer isCompletion;

    @ApiModelProperty(value = "是否需要计量[0-否，1-是]")
    private Integer isMeasure;

    @ApiModelProperty(value = "新智类型[1.清扫2.病害3.维修]")
    private Integer xzType;



    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
